package com.hsmpay.mobile.service.user;

import com.hsmpay.common.service.MemcachedService;
import com.hsmpay.mobile.pojo.user.SendmsgLog;

import java.io.Serializable;
import java.util.Map;

/**
 * 验证接口 暂时不做保存
 *
 * @author 颜铃璋
 * @date 2013-1-28
 */
public interface VerifiService<Entity extends Serializable, Query extends Object> extends MemcachedService<Entity, Query> {
    public Integer CODETYPE_REGISTER = 1;//注册
    public Integer CODETYPE_UPBBANKCARD = 2;//修改绑定银行卡
    public Integer CODETYPE_UPCRASHT1TYPE = 3;//修改结算类型
    public Integer CODETYPE_RETRIEVEPWD = 4;//找回密码
    public Integer CODETYPE_CARDBIND = 5;//信用卡绑定
    public Integer CODETYPE_DELETECARDBIND = 6;//秒到信用卡删除

    /**
     * 保存手机验证码 到memcache
     *
     * @param mobile
     * @param code
     * @return
     * @throws Exception
     */
    public Map<String, String> sendMobileCode(String mobile, String code, SendmsgLog sendmsgLog,String content) throws Exception;

    /**
     * 校验信息
     *
     * @param codeType
     * @param verifiType
     * @param codeOrPswd
     * @param mobile
     * @param payPawd
     * @return
     * @throws Exception
     */
    public boolean verifiCode(Integer codeType, Integer verifiType, String codeOrPswd, String mobile, String payPawd) throws Exception;
}
